/**
 * 
 */
package com.keggview.application.xml.datatypes;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

//import org.dom4j.Element;

/**
 * @author Pablo
 * 
 * 
 * The subtype element specifies more detailed information about the nature of
 * the interaction or the relation. The attributes of this element are as
 * follows.
 */
@XStreamAlias("subtype")
public class Subtype extends Base {

	/**
	 * Interaction/relation information
	 * 
	 * The name attribute specifies the subcategory and/or the additional
	 * information in each of the three types of the generalized protein
	 * interactions. The correspondence between the type attribute of the
	 * relation element (ECrel, PPrel or GErel) and the name and value
	 * attributes of the subtype element is shown below.
	 */
	@XStreamAsAttribute
	String name;
	@XStreamAsAttribute
	String value;

	@XStreamOmitField
	public final static String N_CMPND = "compound";
	@XStreamOmitField
	public final static String N_HIDCP = "hidden compound";
	@XStreamOmitField
	public final static String N_ACTIV = "activation";
	@XStreamOmitField
	public final static String N_INHIB = "inhibition";
	@XStreamOmitField
	public final static String N_EXPRS = "expression";
	@XStreamOmitField
	public final static String N_RPRSN = "repression";
	@XStreamOmitField
	public final static String N_INDEF = "indirect effect";
	@XStreamOmitField
	public final static String N_STCHN = "state change";
	@XStreamOmitField
	public final static String N_BINDG = "binding";
	@XStreamOmitField
	public final static String N_ASSOC = "association";
	@XStreamOmitField
	public final static String N_DISAS = "dissociation";
	@XStreamOmitField
	public final static String N_PHOSP = "phosphorylation";
	@XStreamOmitField
	public final static String N_DEPHO = "dephosphorylation";
	@XStreamOmitField
	public final static String N_GLYCO = "glycosylation";
	@XStreamOmitField
	public final static String N_UBIQI = "ubiquitination";
	@XStreamOmitField
	public final static String N_METYL = "methylation";

	/**
	 * @param name
	 * @param value
	 */
	public Subtype(String name, String value) {
		this.name = name;
		this.value = value;
		Registry.register(this);
	}
	
//	public Subtype(Element element) {
//		this.value = element.attribute("value").getValue();
//		String tempName = element.attribute("name").getValue();
//		if (tempName.equals(Subtype.N_ACTIV)) {
//			this.name = Subtype.N_ACTIV;
//		}
//		if (tempName.equals(Subtype.N_ASSOC)) {
//			this.name = Subtype.N_ASSOC;
//		}
//		if (tempName.equals(Subtype.N_BINDG)) {
//			this.name = Subtype.N_BINDG;
//		}
//		if (tempName.equals(Subtype.N_CMPND)) {
//			this.name = Subtype.N_CMPND;
//		}
//		if (tempName.equals(Subtype.N_DEPHO)) {
//			this.name = Subtype.N_DEPHO;
//		}
//		if (tempName.equals(Subtype.N_DISAS)) {
//			this.name = Subtype.N_DISAS;
//		}
//		if (tempName.equals(Subtype.N_EXPRS)) {
//			this.name = Subtype.N_EXPRS;
//		}
//		if (tempName.equals(Subtype.N_GLYCO)) {
//			this.name = Subtype.N_GLYCO;
//		}
//		if (tempName.equals(Subtype.N_HIDCP)) {
//			this.name = Subtype.N_HIDCP;
//		}
//		if (tempName.equals(Subtype.N_INDEF)) {
//			this.name = Subtype.N_INDEF;
//		}
//		if (tempName.equals(Subtype.N_INHIB)) {
//			this.name = Subtype.N_INHIB;
//		}
//		if (tempName.equals(Subtype.N_METYL)) {
//			this.name = Subtype.N_METYL;
//		}
//		if (tempName.equals(Subtype.N_PHOSP)) {
//			this.name = Subtype.N_PHOSP;
//		}
//		if (tempName.equals(Subtype.N_RPRSN)) {
//			this.name = Subtype.N_RPRSN;
//		}
//		if (tempName.equals(Subtype.N_STCHN)) {
//			this.name = Subtype.N_STCHN;
//		}
//		if (tempName.equals(Subtype.N_UBIQI)) {
//			this.name = Subtype.N_UBIQI;
//		}
//	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}
	
	

}
